home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbchange.man < prev    next >
Text File  |  1993-04-22  |  2KB  |  67 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                 dbchange
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbchange
  6.  
  7.   FUNCTION:
  8.        Determine whether a command batch has changed the  current  data-
  9.        base.
  10.  
  11.   SYNTAX:
  12.        char *dbchange(dbproc)
  13.  
  14.        DBPROCESS *dbproc;
  15.  
  16.   COMMENTS:
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbchange                Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o dbchange() informs the program of a change in the current data-
  28.          base.   It does so by catching any instance of the Transact-SQL
  29.          USE command.
  30.        o Although a USE command can appear anywhere in a command  batch,
  31.          the database change does not actually take effect until the end
  32.          of the batch.  dbchange() is therefore useful only in determin-
  33.          ing  whether the current command batch has changed the database
  34.          for subsequent command batches.
  35.  
  36.        o The internal DBPROCESS flag that dbchange() monitors to  deter-
  37.          mine  whether the database has changed is cleared when the pro-
  38.          gram executes a new command batch by calling either dbsqlexec()
  39.          or  dbsqlsend().   Therefore, the simplest way to keep track of
  40.          database changes is to call dbchange() when dbresults() returns
  41.          NO_MORE_RESULTS at the end of each command batch.
  42.        o Alternatively, you can always  get  the  name  of  the  current
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                 dbchange
  47.   ______________________________________________________________________
  48.          database by calling dbname().
  49.  
  50.   PARAMETERS:
  51.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  52.            connection for a particular front-end/SQL Server process.  It
  53.            contains all the information that DB-Library uses  to  manage
  54.            communications and data between the front end and SQL Server.
  55.  
  56.   RETURNS:
  57.        A pointer to the null-terminated name of  the  new  database,  if
  58.        any.  If the database has not changed, NULL will be returned.
  59.  
  60.   SEE ALSO:
  61.        dbname, dbresults, dbsqlexec, dbsqlsend, dbuse
  62.  
  63.  
  64.  
  65.  
  66.  
  67.